package lab.gene.action;

import java.util.List;

import lab.gene.pojo.GeneImageFile;
import lab.gene.service.impl.GeneImageFileServiceImpl;

import com.opensymphony.xwork2.ActionSupport;

public class ViewGeneImageListByNameAndFormAction extends ActionSupport {
	
	private static final long serialVersionUID = 1L;
	private List<GeneImageFile> imageList = null;
	private String geneName = null;
	private String formName = null;
	
	private int count = 0;
	
	public String execute() {
		GeneImageFileServiceImpl service = new GeneImageFileServiceImpl();
		imageList = service.getGeneImageFilesByGeneNameAndFormName(geneName, formName);
		if (imageList != null)
			setCount(imageList.size());
		return "success";
	}

	public List<GeneImageFile> getImageList() {
		return imageList;
	}

	public void setImageList(List<GeneImageFile> imageList) {
		this.imageList = imageList;
	}

	public String getGeneName() {
		return geneName;
	}

	public void setGeneName(String geneName) {
		this.geneName = geneName;
	}

	public String getFormName() {
		return formName;
	}

	public void setFormName(String formName) {
		this.formName = formName;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}
	

}
